<template>
    <div class="banner">
        <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
            <van-swipe-item v-for="item in banner_url" :key="item.id">
                <img style="height: 200px; width: 100%" :src="item.url" />
            </van-swipe-item>
        </van-swipe>
    </div>
</template>

<script setup lang="ts">
import { ref,onMounted } from 'vue'
const props = defineProps(['bannerList'])

onMounted(() => {
    console.log(`props.bannerList>>>`,props)
      
})
const banner_url = ref([
    {id:1,url:'https://img2.baidu.com/it/u=717979571,3244631707&fm=253&fmt=auto&app=138&f=JPEG?w=1280&h=400'},
    {id:2,url:'https://img1.baidu.com/it/u=1733684228,4177721799&fm=253&fmt=auto&app=138&f=JPEG?w=1200&h=500'},
    
])
</script>

<style lang="scss" scoped>
// 轮播
.banner {
    padding: 0 12px 0 12px;
    .my-swipe {
        border-radius: 10px;
        .van-swipe-item {
            color: #fff;
        }
    }
}
</style>
